<template>
  <div class="home">
    <div class="main-container">
      <iframe
        class="iframe"
        src="http://www.thingjs.com/pp/865ebf0082775491124996e4"
      ></iframe>
    </div>
    <!-- <el-button class="button" @click="goVenue">去xxx场馆</el-button> -->
  </div>
</template>

<script>
// @ is an alias to /src

export default {
  name: "Home",
  created() {
    window.addEventListener(
      "message",
      function() {
        // if (e.data && e.data.from) {
        //   var data = e.data;
        //   var funcName = data.funcName;
        //   var param = data.param;
        // }
        // 调用 ThingJS 页面方法
      },
      true
    );
  },
  methods: {
    goVenue() {
      window.frames[0].postMessage("message from parentwindow", "*");
    }
  }
};
</script>
<style lang="less" scoped>
.home {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}
.iframe {
  width: 100%;
  height: 100vh;
}
.button {
  position: absolute;
  top: 20px;
  left: 20px;
}
.left-container {
  .title-wrap {
    font-size: 30px;
    font-family: SourceHanSansSC-Medium, SourceHanSansSC;
    font-weight: 500;
    color: rgba(0, 182, 199, 1);
  }
}
</style>
